import { Injectable } from '@angular/core';
import { HttpService } from '../HTTP/http.service';
import { HttpParams } from '@angular/common/http';

import { appmanageApirequestInterface } from './interface/appmanage.apirequest.interface';
@Injectable()
export class AppManageApirequest implements appmanageApirequestInterface {

  createApp(AppId: string, AppName: string): Promise<void> {
    return this.http.post('/api/App/Manage/Create', { AppId, AppName });
  }

  updateApp(AppId: string, AppName: string): Promise<void> {
    return this.http.post('/api/App/Manage/Update', { AppId, AppName });
  }

  deleteApp(AppId: string): Promise<void> {
    return this.http.post('/api/App/Manage/Delete', { AppId });
  }

  getAppById(appId: string): Promise<any> {
    return this.http.get('/api/App/Manage/FindById', { appId });
  }

  getAppList(): Promise<any> {
    return this.http.get('/api/App/Manage/List');
  }
  constructor(private http: HttpService) {
  }


}